﻿@model IEnumerable<CardInChina.Data.Entity.Entity.CardInfo>
           
<div class="saleTop">
    <div class="lm">
        <h2>
            销售排行<span>TOP 10</span></h2>
    </div>
    <div class="saleTop_list">
        <div class="saleTop_list_bg">
            <!-- Accordion -->
            <div class="tabcon" id="sale-top">
                @for (int i = 0; i < Model.Count(); i++)
                {
                    CardInChina.Data.Entity.Entity.CardInfo ci = Model.ElementAt(i);
                    <h3>
                        <span class="ui-icons ui-icon-fore@(i + 1)"></span>
                        @Html.ActionLink(ci.CardName, "Index", "CardDetail", new { cardKey = ci.CardKey }, null)
                    </h3>
                    <div class="p-img">
                        @if (ci.Photo == null)
                        {
                            <a href="@Url.Action("Index", "CardDetail", new { cardKey = ci.CardKey }, null)">
                                <img src="/content/images/ss.gif" /></a>
                        }
                        else
                        {
                            <a href="@Url.Action("Index", "CardDetail", new { cardKey = ci.CardKey }, null)">
                                <img src="/content/images/photo/@ci.Photo" /></a>
                        }
                    </div>
                }
            </div>
        </div>
    </div>
    <div class="lb">
    </div>
</div>

<script type="text/javascript">
    $(function () { 
        $("#sale-top").accordion({
            event: "mouseover"
        });
    });
</script>
